package com.myosw.action;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;

import com.myosw.entity.SearchlogShow;
import com.myosw.service.SearchlogService;
import com.myosw.util.Base64Coder;

public class KeywordAction extends BaseAction {

	@Override
	public void execute() throws ServletException, IOException {
		
		 List<SearchlogShow> list = searchlogService.getTop(0, 10);
		
		 root.put("menu", "keyword");
		 root.put("list", list);
		printFreemarker("default/keyword.ftl", root);
	}
	
	
	public void show() 
	{
		String keyword = request.getParameter("keyword");

		 SearchlogShow show = searchlogService .getVisitlog(keyword );
		root.put("menu", "keyword");
		root.put("keyword", keyword);
		root.put("show",  show);
		printFreemarker("default/keywordshow.ftl", root);
	}
	SearchlogService searchlogService = new SearchlogService();
}
